0a624731aed60ece17bd22daef5bc30db7f556e2,src/main/java/com/flexpoker/table/query/handlers/PlayerFoldedEventHandler.java,PlayerFoldedEventHandler,handleUpdatingTable,#PlayerFoldedEvent#,54

Before Change



        Set<PotDTO> updatePots = new HashSet<>();

        for (PotDTO potDTO : currentTable.getPots()) {
            Set<String> updatedPotSeats = potDTO.getSeats();
            updatedPotSeats.remove(username);
            updatePots.add(new PotDTO(updatedPotSeats, potDTO.getAmount(),

After Change


                    return seatDTO;
                }).collect(Collectors.toList());

        Set<PotDTO> updatePots = currentTable.getPots().stream()
                .map(potDTO -> {
                    Set<String> updatedPotSeats = potDTO.getSeats().stream()
                            .filter(x -> !x.equals(username))
                            .collect(Collectors.toSet());
                    return new PotDTO(
                            updatedPotSeats,
                            potDTO.getAmount(),
                            potDTO.isOpen(),
                            potDTO.getWinners());
        }).collect(Collectors.toSet());

        TableDTO updatedTable = new TableDTO(currentTable.getId(),
                event.getVersion(), updatedSeats, currentTable.getTotalPot(),